package com.tensquare.frined.controller;

import entity.Result;
import entity.StatusCode;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class FriendExceptionHandle {
    @ExceptionHandler(Exception.class)
    public Result exception(Exception e){
        return new Result(false , StatusCode.ERROR , e.getMessage());
    }

}
